Skip to content

Controller interface for v7#3312

Open
termi-official wants to merge 90 commits intoSciML:v7from
termi-official:do/break-controller-interface-v7
Open

Controller interface for v7#3312
termi-official wants to merge 90 commits intoSciML:v7from
termi-official:do/break-controller-interface-v7

Conversation

@termi-official
Copy link
Copy Markdown
Contributor

@termi-official termi-official commented Apr 1, 2026

TODO

  • Port StochasticDiffEq controllers
  • Port DelayDiffEq controllers

Follow Up

@oscardssmith oscardssmith reopened this Apr 1, 2026
@oscardssmith oscardssmith reopened this Apr 2, 2026
@termi-official termi-official force-pushed the do/break-controller-interface-v7 branch from 1ae361c to 31d075e Compare April 2, 2026 21:13
@ChrisRackauckas ChrisRackauckas force-pushed the v7 branch 2 times, most recently from c3ec6e5 to cb38e96 Compare April 9, 2026 19:06
@termi-official termi-official force-pushed the do/break-controller-interface-v7 branch 2 times, most recently from 4342ec9 to d146c8d Compare April 10, 2026 16:24
Comment on lines +427 to 434
function default_controller(QT, alg)
if ispredictive(alg)
return NewPredictiveController(QT, alg)
return PredictiveController(QT, alg)
elseif isstandard(alg)
return NewIController(QT, alg)
return IController(QT, alg)
else
return NewPIController(QT, alg)
return PIController(QT, alg)
end
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since we are breaking stuff right now anyway, this part of the setup workflow here is something which we might want to think about. I think we should

  1. Purge isstandard/ispredictive
  2. Algorithms with special controllers should just dispatch on default_controller (see e.g. lib/OrdinaryDiffEqLowStorageRK/src/alg_utils.jl)
  3. In all other cases we return a standard PI or PID controller with reasonable (and algorithm order sensitive) default parameters.

return PIController(beta1, beta2)
end
end
# FIXME AitkenNeville is missing integration with the extrapolation controller and picks up the PI controller instead.
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know how to fix this, as I do not know enough about the theory here.

ChrisRackauckas and others added 18 commits April 10, 2026 20:05
BREAKING: OrdinaryDiffEq.jl now only depends on OrdinaryDiffEqDefault
and its transitive dependencies (Core, Tsit5, Verner, Rosenbrock, BDF).
Users needing other solvers must explicitly import the specific sublibrary
(e.g., `using OrdinaryDiffEqSDIRK` for ImplicitEuler, KenCarp4, etc.).

The available algorithms from `using OrdinaryDiffEq` are now:
- DefaultODEAlgorithm (auto-selection)
- Tsit5, AutoTsit5
- Vern6, Vern7, Vern8, Vern9, AutoVern6/7/8/9
- Rosenbrock23, Rosenbrock32, Rodas3/4/5/5P/5Pe/5Pr, and other Rosenbrock methods
- FBDF, QNDF, ABDF2, and other BDF methods
- Core utilities (CompositeAlgorithm, AutoSwitch, controllers, etc.)

This reduces the dependency count from 28+ solver subpackages + many external
deps to just 6 direct deps (+ their transitive deps), greatly improving
install time and load time for users who only need common solvers.

Refs SciML#2310

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… DiffEqBase, and OrdinaryDiffEqCore

StochasticDiffEqCore: Remove deprecated alias_u0/alias_jumps/alias_noise keyword
handling and beta1/beta2 PID parameter deprecation warnings.

DelayDiffEq: Remove deprecated initial_order keyword handling and beta1/beta2
PID parameter deprecation warnings.

DiffEqBase: Remove @deprecate fastpow, @deprecate_binding DEStats,
internalnorm deprecation warning in __add_and_norm, and @deprecate concrete_solve.

OrdinaryDiffEqCore: Remove deprecated alias_u0/alias_du0 keyword handling,
beta1/beta2/qmin/qmax/qsteady_min/qsteady_max/qoldinit PID parameter
deprecation warnings, and legacy controller reconstruction path.

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove the `_bool_to_ADType` function and Bool overloads of
`_process_AD_choice` from OrdinaryDiffEqCore. Users must now pass
ADTypes (e.g. `AutoForwardDiff()`, `AutoFiniteDiff()`) instead of
`autodiff=true/false`. Passing a Bool now throws an ArgumentError
with a clear migration message.

Also removes the deprecated `chunk_size`, `diff_type`, and
`standardtag` keyword arguments from all algorithm constructors
across ~56 algorithm structs. These are now derived directly from
the ADType object. The struct type parameters {CS, AD, FDT, ST, CJ}
are preserved for backward compatibility with dispatch.

Key changes:
- New helpers: `_ad_chunksize_int`, `_ad_fdtype`, `_fixup_ad`
- `alg_autodiff` no longer converts Val{true}/Val{false}
- `SciMLBase.remake` for implicit algs simplified
- StochasticDiffEqImplicit algorithms updated to use ADTypes
- Tests updated to use ADTypes instead of Bool

Closes SciML#2310

Co-Authored-By: Chris Rackauckas <accounts@chrisrackauckas.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@termi-official termi-official force-pushed the do/break-controller-interface-v7 branch from 9eb65dd to 1f18dc7 Compare April 10, 2026 18:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants